home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 14698 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  853 b 

  1. Path: niktow.canisius.edu!gort!duchan
  2. From: duchan@gort.canisius.edu (Alan Duchan)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Turbo C++ won't write 0Ah to file!?!?
  5. Date: 1 Apr 1996 19:21:35 GMT
  6. Organization: Canisius College, Buffalo, NY  14208
  7. Message-ID: <4jpabv$9e8@niktow.canisius.edu>
  8. References: <4jnpcg$nis@tribune.concentric.net>
  9. NNTP-Posting-Host: gort.canisius.edu
  10. X-Newsreader: TIN [version 1.2 PL2]
  11.  
  12. mikolaj@concentric.com wrote:
  13. : Turbo C++ 3.0 won't write character 0Ah to a file, instead it writes 0Dh.
  14. : What's the problem? Is this a bug?
  15.  
  16. My guess is that your program is actually writing 0Dh followed by
  17. 0Ah--that is, convert a LF to a CR/LF. This is what Borland and most
  18. (all?) MS-DOS based compilers do with a file opened in "text" mode.  To
  19. write without any conversions, open the file in "binary" mode. 
  20.  
  21. Hope this helps, Alan Duchan
  22.